Fix 3.14 tk tests#1059
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to fix tkinter-related test failures when running tests with Python 3.14 by installing additional Tcl/Tk system dependencies and configuring environment variables for Tcl/Tk library paths. It also increases the test coverage threshold from 80% to 89%.
- Adds explicit Tcl/Tk 8.6 system packages to ensure compatibility with Python 3.14
- Configures TCL_LIBRARY and TK_LIBRARY environment variables to help Python locate Tcl/Tk libraries
- Updates coverage requirements to reflect improved test coverage
| exit 1 | ||
| fi | ||
| coverage report --fail-under=80 | ||
| coverage report --fail-under=89 |
There was a problem hiding this comment.
The coverage threshold has been increased from 80% to 89%, which is a significant jump of 9 percentage points. This appears to be an arbitrary change that is not directly related to fixing Python 3.14 Tcl/Tk tests. According to ARCHITECTURE.md, coverage should "increase monotonically", but such a large jump may cause issues if the actual coverage improvement is smaller. Consider verifying that the actual coverage increase justifies this threshold change, or adjust it to match the actual coverage achieved by the test improvements.
| coverage report --fail-under=89 | |
| coverage report --fail-under=80 |
| coverageFile: coverage.xml | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| thresholdAll: 0.80 | ||
| thresholdAll: 0.89 |
There was a problem hiding this comment.
The coverage threshold in this second location has also been increased from 0.80 to 0.89. This should be consistent with the change on line 230, but the same concern applies: verify that the actual coverage increase justifies this threshold change to avoid breaking the CI pipeline unnecessarily.
| thresholdAll: 0.89 | |
| thresholdAll: 0.80 |
| echo "TCL_LIBRARY=/usr/share/tcltk/tcl8.6" >> $GITHUB_ENV | ||
| echo "TK_LIBRARY=/usr/share/tcltk/tk8.6" >> $GITHUB_ENV |
There was a problem hiding this comment.
The Tcl/Tk library paths specified here may not be correct for Ubuntu systems. The standard Tcl/Tk library paths on Ubuntu are typically /usr/lib/tcl8.6 and /usr/lib/tk8.6, not /usr/share/tcltk/tcl8.6 and /usr/share/tcltk/tk8.6. The /usr/share/tcltk/ path typically contains documentation and demos, not the library files themselves. Consider verifying these paths are correct for the Ubuntu version used in GitHub Actions, or use dynamic path detection to ensure compatibility.
| echo "TCL_LIBRARY=/usr/share/tcltk/tcl8.6" >> $GITHUB_ENV | |
| echo "TK_LIBRARY=/usr/share/tcltk/tk8.6" >> $GITHUB_ENV | |
| echo "TCL_LIBRARY=/usr/lib/tcl8.6" >> $GITHUB_ENV | |
| echo "TK_LIBRARY=/usr/lib/tk8.6" >> $GITHUB_ENV |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Test Results 3 files + 3 3 suites +3 31m 44s ⏱️ + 31m 44s For more details on these failures and errors, see this check. Results for commit 1097a42. ± Comparison against base commit 9e79d2e. ♻️ This comment has been updated with latest results. |
3b98868 to
1097a42
Compare
1097a42 to
cef1066
Compare
No description provided.